<!--
* @Author       : 李江涛
* @Description  :
-->

<template>
  <div>
    <div class="text-center">姓名：{{ store.name }}{{ text }}</div>
    <nut-button class=" !mt-10" type="primary" @click="onGoTo">test goTo</nut-button>
    <input v-model="text" class="border my-2" type="text" />

    <Card :class="[$style.red]">
    
    </Card>
    <div
      v-for="(item, index) in list"
      :key="index"
      class="mx-2 mb-2 p-4 bg-slate-300"
    >
      {{ item }}
    </div>
  </div>
</template>

<script lang="ts">
export default { name: "Disclosure" };
</script>

<script lang="ts" setup>
import { onMounted, ref } from "vue";
import { useUserStore } from "@/store/user";
import { goTo } from "@/router/go";
import { getAllCareerJobs } from "@/api/common";
import Card from "./cpn/card.vue";

const store = useUserStore();
const text = ref("");
const list = ref<any[]>([]);

onMounted(async () => {
  const res = await getAllCareerJobs();
  list.value = res.data.allJobs.map((item) => item.jobInfo);
  console.log('[ res ] ==>', list.value);
});

const onGoTo = () => {
  goTo({ pageType: "inquire", params: { a: 1, b: 0 } });
};
</script>

<style module lang="scss">
.red {
  color: red;
}
.bgBlue{
  background-color: blue;
}
</style>
